//
//  HDOperationActivitiesData.h
//  HDOperationProject
//
//  Created by Mirko on 15/10/30.
//  Copyright (c) 2015年 Mirko. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface HDOperationActivitiesData : NSObject

@property (nonatomic, strong, readonly) NSString * operationId;
@property (nonatomic, assign, readonly) NSTimeInterval displayTime;      // 活动页面展示时间
@property (nonatomic, assign, readonly) BOOL allowClose;                 // 活动页面是否允许关闭
@property (nonatomic, strong, readonly) NSString *operationUrl;          // 活动页面展示图片
@property (nonatomic, strong, readonly) NSString *linkUrl;               // 活动点击展示的URL链接
//@property (nonatomic, assign, readonly) BOOL isChange;                   //推广活动是否有变化

/*************** 由已有属性构造的属性 ****************/

@property (nonatomic, assign, readonly) BOOL isNeedDisplay;              // 活动图片是否需要显示
@property (nonatomic, assign, readonly) BOOL isNeedDelete;               // 活动图片是否需要删除
@property (nonatomic, strong) NSString *fileName;                        // 本地文件名字
@property (nonatomic, strong) NSString *pathDisk;                        // 文件绝对路径

+(HDOperationActivitiesData *)data:(NSDictionary *)dataInfo;

/** 获取一个默认的广告信息 */
+(HDOperationActivitiesData *)defaultAdInfo;

/** 活动图片 */
- (UIImage *)image;

/** 下载活动图片 */
- (void)startDownloadImage;

/** 把普通数组转换为model数组 */
+ (NSArray *)modelsFromArray:(NSArray *)arr;


/** 测试model */
+ (HDOperationActivitiesData *)testModel;

@end
